<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>

<div style="z-index: 20" id='nonPositionedDiv'></div>
<div style="z-index: 20; position: absolute" id='positionedDiv'></div>

<script>
test(() => {
    assert_equals(getComputedStyle(nonPositionedDiv).zIndex, '20', 'Computed style');
    assert_equals(nonPositionedDiv.style.zIndex, '20', 'Inline style');
}, 'z-index on non-positioned div');

test(() => {
    assert_equals(getComputedStyle(positionedDiv).zIndex, '20', 'Computed style');
    assert_equals(positionedDiv.style.zIndex, '20', 'Inline style');
}, 'z-index on positioned div');
</script>
